<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
	<title>html事件监听程序</title>
	<style type="text/css">
		#qwe{
			width: 300px;
			height: 300px;
		}
	</style>
</head>
<body>
<div onclick="changeColor()" ondblclick="changed()" id="asd">zheghais</div>
<div onmousedown="changeColor()" id="qwe">zheghais</div>
<div onmouseover="changeColor()" id="qw">kjasda </div>
<script type="text/javascript">
function changeColor() {
	var oDiv = document.getElementById('qw');
	oDiv.style.backgroundColor = 'red';
}
function changed() {
	var oDiv = document.getElementById('asd');
	oDiv.style.backgroundColor = 'blue';
}
</script>


</body>
</html>